<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定时器</title>
  </head>
  <body>
    <button id="btn2">停止</button>
    <script src="./test.js">
      setTimeout(function(){
        console.log('hello world');
      },1000);
      while(true){
        
      }
    </script>
  </body>
</html>